package com.woniuxy.dao;

import com.woniuxy.entity.Production;
import com.woniuxy.entity.SelectOption;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Leimin
 * @date 2022/04/27 14:48
 **/
@Mapper
public interface ProductionDao {
    List<Production> findAllByCondition(Production production);

    List<Production> findAll();

    Production findOne(int id);

    int addOne(Production production);

    int deleteOne(int id);

    int deleteBatch(int[] ids);

    int updateOne(Production production);

    List<SelectOption> findTypeOption();

    List<SelectOption> findBrandOption();

    List<SelectOption> findUnitOption();

    List<SelectOption> findWarehouseOption();

    Production findByCode(String material_code);

    Production findByName(String name);

    int addToWarehouse(@Param("material_code") String material_code, @Param("warehousename") String warehousename);

    int updateWarehouse(@Param("material_code") String material_code, @Param("warehousename") String warehousename);
}

